using System;
using System.Collections.Generic;
using System.Collections;
using System.Text;

namespace MVCFramework.Models
{
    public abstract class ModelDrawable:IModelDrawable 
    {
        #region IModel OGL Members
        public Hashtable _hashTable;
        public bool needsUpdate = true;
        public Hashtable HashTable
        {
            get
            {
                return _hashTable;
            }
            set
            {
                _hashTable = value;
            }
        }

        public bool NeedsUpdate
        {
            get
            {
                return needsUpdate;
            }
            set
            {
                needsUpdate = value;
            }
        }

        #endregion

        #region IModelDrawable Members


        IdManager<ICountable> _idManager;

        public int MaxId
        {
            get { return  _idManager.MaxId; }
        }

        public object GetObject(int id)
        {
            return _idManager.GetObjectById(id);
        }

        #endregion

        #region IVisitorHost Members

        public void Accept(IVisitor visitor)
        {
            visitor.Visit(this);
        }

        #endregion

        #region IEnumerable Members

        public abstract  IEnumerator GetEnumerator();

        #endregion
    }
}
